Added additional check before removing the dictionary file