copy the file, TODO, ensure that the old file is removed