In reader.py, fix the unclosed file handle in read_first_line so the file is always properly closed. Do not change any other behavior.
