Adding ability to read config from file

Adding another way to read config from a stream (reader) instead of a file.