catch exception when writing content, marking vfs for rebuild (IDEA-125925)
(cherry picked from commit 68c651e)