Log errors
Merge pull request #2 from bernardocamilo/log_on_error

Log errors