this calls getc, which calls read_string, which calls check_open