Previously, it created a temporary directory and then fail when FileOutputBuffer renames that file to the destination file (which is actually a directory name).