Sort files after errorhandling