logfile and clean code