Initial error handling
More exception handling