writefile({object}, {fname} [, {flags}])
flags contains a "b" then binary mode is used
"a" then append mode is used which causes the data in object to be appended to the file. (By default, the content of the file is replaced)
"s" then fsync() is called after writing the file
"S" then fsync() is not called even if fsync is set flags does not contain an s or S, fsync() is called only if fsync is set.