Add toString to basename attributes