Added the option to keep or remove old file