added missing setting of query for directory input with files containing multiple individual queries