atomic file operations