Avoid using deprecated "safe" write option when possible