Map can now be written to a file-like object.