check path length before rename