prepReader.py: Close topology file after writing