Correct use of obj.basename