Fixed removal of temporary files