Testscript writes to file