Catch errors during RETR and respond with a 550 before actually starting the data connection to prevent corrupt files on the client side.