migrated logger use to logfile