Add numpydocs style docstrings and use "with open()" instead of file()