fixed file clean up issue