more code for detecting long and short binary names, update #2383