Save query dialog validation

@myabc why is this now necessary?