Whenever you add files to your Query definition or remove files from it, you also need to refresh the automation configuration, which is basically just a list of the files needed by the Query and must match the Query definition. See the link below for step-by-step instructions.