added check for binary existence