modified to run as script.  Needs to be copied to folder on python path.\n Added check for existing record before inserting delete record change