You may need a special hammer to fit an arbitrary Python byte string into a jarray that writeFile likes:
writeFile