writeFileSync is fine for all of these if it makes things simpler for you?