Few simple tweaks to allow specification of trace file and do basic error checking (oops)