Improve output messages in PrimalityTest