Fixes #113 by throwing an exception when it can not create a file. Also cleaned up some error messages.
Merge pull request #127 from richmulhern/controllerfixes

Fix #113