Make a directory on your machine for the book, with subdirectories for each chapter. Put the code files for the problems/examples in the proper place and you should have no doubts.
Mark up the book (well, if it's paper) as you go. And the expression "bookmark" did not always involve URLs.