change debug output from fmt to log