Added error logging for exceptions

That's why I want to get this merged asap! :smile: