Issues with println buffering output when redirecting stdout to a txt file

Unfortunately this stack overflows for me too - however I did have to add in import Base.println before the code otherwise it wouldn’t compile. Is this preventing the shadow?