fix files can't be processed after error occurred