Fix linux compile warning
Add dir and filename sorting