delete some unnecessary codes for rmdir