[Refactor] - Correct the logics when removing the HDFS folder