If we are unable to open the preferences file we shouldn't try to read from it. This led to a segmentation fault when compiled in release mode, but for some reason it worked when compiled in debug mode?
Right now I only store boolean values, but I think I've coded this in a way to make adding new values easy.