debug log, fixes