Fix template issue and write  config if no config found

Related to #97.

// We've got  600 commits, by the way.