avoid hanging when saving some files