add the file removing when fatal error and clear the structure of module