Added proper behaviour for renamed file cases.