Reading files is now more robust
Added option to direct the current run to a file without the websocket logic