fix a bug when qpfile is not specified