Factor out testing for binary existence