try to fix upload bug, files should now always be deleted