Added a function for IOhandler write