refactoring parser logging