fix: handling corrupt files
improved: handling corrupt files