Fix for #406

This fixes the issue #406 by printing the error log and re-throwing the error, therefore sending the message to the Web UI. This is done here because higher level Guice classes are not using the logback logger. Formatting changes are there because try/catch block changes indentation of a whole block.

See #407 for the earlier attempt.