Added logging and correct exit condition
Properly finish the stream
Merge branch 'master' of github.com:anvaka/ghindex