change some file names; fix bug when query messages