When adding a new query in an existing .xql file or adding a new .xql file, you need to reload it from the APM. Maybe you missed that step.