Declare mongo_query local variable; add exception printou