Rework script to support config file
Add example config files and README