Add an error handler so 500 errors are json

Previously it was using the express default, which is to return an html
page. This makes sure that all errors are handled by returning JSON.
Add stats to import

Let the user know how many records successfully imported.