filetools.py: small changes after remarks