I came up with a new way of avoiding the error handling lockup bug in