Working version with sample configuration file