At Mass, pope prays for prisoners, families