updated version
fixed write path error