Fix write call

Signed-off-by: Hector Acosta <hector.acosta@gmail.com>