Fixed * and ? added check of query in file