replace write_term/3 with fmt_write/3 to solve the build problem.
fmt_write/3 is better anyway.
Authored by: "kifer" 2018-06-12
Parent: [r9356]
Child: [r9358]