fix: use FileUtils to write file