Add trap in dart bash script