flush on a file without write shouldn't write.

    This caused a problem where we were trying to write to invalid
    files.