check if cache dir exist before removing it