tests: ensure file is written before spawn