File path, absolute or relative to <path_MotorXP-AFM>/bin/assets/scripts.
Contents to write to the file.
Optionalappend: boolean
If true, appends data to the file. If false, clears the file before writing.
True if writing succeeded. On error, returns false and prints an error message to the console.
writeFile() writes to a file.