clean up log files

also changed the way detect debugger