file checking
empty file check
housekeeping