debug renamed as utils and a new 'fail_if_cmd_error' function added