refactoring: change the write method, remove the append flag, add ability to pass multiple separate strings