Add config file and adjust code accordingly