Fix for TypeError: write()