Improving safetyin a closed loop system simulation of an artificial pancreas: the role of ketone bodies monitoring