But he narrowly escaped being discharged, and on thinking the matter over he saw how great was his folly. So he determined, with God's help, to give up his evil ways, and was enabled to lead a better life in future.