Fix #58 Improve logging and error handling
Merge pull request #59 from ggiamarchi/quality#58

Fix #58 Improve logging and error handling