change to use file resource to remove whole dir