When the jailer woke up and saw that the doors were open, he thought that the prisoners had escaped. He pulled out his sword and was about to kill himself.