REF: remove 't' flag for files open in write mode as well.