Added error checks for checkout and addBookCopy