In reader.py, fix the unclosed file handle in read_first_line. Use a 'with open(...)' context manager so the file is always closed.
