improve error reporting, refactor app.rb a little