logic on filepath and registry keys