Log debugging info rather than printing it