FIX: Correctly handle the case when the renamed file belongs to the same host