You can't rename to an existing location.

Next to that, unlink might fail if for some reason the provided path is removed already by something else, so might want some error detection.