better handling of exceptions during startup