added switch for storeType. allowing to either write to graphDB or file