Updated error handling and reformat

ibid
Also removed the istringstream preload attempt.