fixes #2 Better error reporting (file/email)