flushFile() is all that remains...I think.