Use io.open(..) for atomic file appends