added read_all, print_all, and read_loop debugging functions