single file writing works