refactoring: moved errorLogger to a new file