Added initial error handling support