added better error handling for renewing books