Fixed generate_book.sh script