Need to be careful with the 'present form', with the __йти verbs, it is usually past. => придя, выйдя и. т. д. => having arrived, having gone out, or, after having arrived, gone out... Not as 'while arriving' 'while leaving'.