Fix error callback when deleting file