Config-related bug-fixes and added example config file to doc