check if folder exits before clearing them