Try to create a file when appending if it doesn't exist.
Merge pull request #12132 from cachedout/12130

Try to create a file when appending if it doesn't exist.