differentiate file and folder in sort