add atomic file operations