incorrectly_sorted should be set within __init__ instead of as a class variable - otherwise it will remain True after one invalid file.