moves book.remove() call to the finally: of a try-except