fix a typo error: replace 'wirte' with 'write'