small bug on log file printing corrected