fix rename files, small bugs