Add Heroku Procfile.
Wrap logfile writes in try/catch block.