basic error handler in place for 404,500 errors
basic error handler in place for 404,500 errors #fixed
working output
better handling of errors
outputs to a file of somewhat useful name, one json element per line