Fixed bug and added functions to write to file or any given stream
Merge branch 'master' of https://github.com/samal84/supersurvey