Adding in error code