unifying format specifiers
fix posix write (use write fd)