optional file handle parameters to analysis

now the file_overser can write into an StringIO, which can be passed to
the analysis function