catch exception while getting file attributes
fix sorting