Fixed error handling.
Files are now deleted after a brief delay.