Debugging middleware for Express