Saves config after using /detect

I did not added the code to save the config before this commit