rearrange file modes to be atomic, clearer(?) comment