Atomic file creation

Solved problem