Help with SystemVerilog task to write AXIS stream to file

In reply to cgales:

Thank you very much! This did resolve my issue. I thought by having it in the “forever @(posedge clk)” block everything would be synchronous, but I guess not. Thanks again for the tip