file checks and logfiles