Changes 2014/12/13

Changes:
+ logging to file.
~ Fixed the issue with saving which repo you use.
~ If the Cjson.SelectionIndex is not compatible with the repos it will
revert to SelectionIndex to 0.