Added code to handle writing body to file on error
Added tests around this
Added another test for when two difference queues need to be saved
Moved code into correct packages for test