Update file.py

Moving rejected changes from 1699 to 1714