Better error handling on startup