Now using basename $file to decide max length