fix bug where .old files were not removed