added exception handling in renameaccounts