Fix method name bug in write function