restructured jpeg streamer. added fileio class to handle file io exclusively