Make write_history not crash on non-streaming jobs
Merge pull request #237 from a1k0n/master

Make write_history not crash on non-streaming jobs