Made saving settings multithreaded