Added primitive error handling to foo/bar