fix bug in remove exists directory