print error message when write packet is impossible