fixed typo "writeToFileSycn" -> "writeToFileSync"

Retained typo'd version to not cause breakage