add small query util
Fix err404 handler name