Have raw file bean flush file metadata.

This commit is rebased back from develop.
Merge pull request #1021 from mtbc/trac-10602

Have raw file bean flush file metadata.