write params to file