Added errorHandler middleware