Format sig messages
Check return of write