coverity#1190347 check rename(3) return value

Change-Id: Iebd3b0e1b52a01e14e01c6db1ca158ada91e8613