modified so as not to create backup copies of overwritten files