It could be a timing issue. To calculate the MD5 it needs to see the whole file and by that time the file has already been transferred i guess. Can you try another way of blocking - via a filename or similar , just to confirm the functionality as a test?