added setErrorReporter and setFileReader methods to avoid dependencies in constructors