Adds errors and error handling.