fixed file deletion