rename and check err