More comprehensive exception handling
More comprehensive exception handling