Added comments to filetools.py