Improved: error middleware displays error message and stack trace in the logs