Added request_id to the function signatures for using when logging errors. Also made more use of the object_log function for capturing the data when logging the errors.