fixing rename and chmod method