added code to backup file