bug fixed when an empty query directory is created, an error info will be printed