fix to attribute test
added file directory loop