changed logging from fmt to log