More error reporting

Got bit by rebar throwing away error messages. This introduces more logging, which will catch e.g. a broken compiler.