Move packet logging before sending the packet

Fixes an issue where the first packet gets send twice
Increase packet timeout time (2 -> 5)