Put packet unpacking into if statement, print error if packet not aligned