Use writeUTF and readUTF for string I/O