Java agent and openFileLog messes up URL redirect

I’m trying to debug a java agent (web agent on server).

I’ve added code to write comments to a text file - this works fine.

The agent used to redirect the browser to another url via a printwriter;

pw.println([…]);

this doesn’t work any more. Any ideas?