Fixed logging to papertrail for errors