Fix log open, add newlines to logs, change debug from fmt to log