added query informatin to saved output files