Add test
Move config file handling to a separate file