mongo queryer with error handling