write content to file