Added a file cleanup function.