Tweaked to use file for configuration