final String name = document.getName();
// TODO: worker function should be moved into this class
HeaderCheckWorker worker = new HeaderCheckWorker(reader, matcher, reporter, name);
worker.read();
} catch (IOException e) {
throw new RatDocumentAnalysisException("Cannot read header", e);
} catch (RatHeaderAnalysisException e) {
throw new RatDocumentAnalysisException("Cannot analyse header", e);
} finally {
if (reader != null) {
try {
reader.close();
} catch (IOException e) {