Config file reading, writing, and validation