add config file loading and saving

closes #1