solve basename_r conflict in a new way