put replacement array into file