Turn on/off debug mode
Emailing log
Refactor using record_content method