file cleanup and bug check round