Change exit (for errors) by exceptions