Create better error reporting. Now possible to check for error.