Split the message if it is longer than 512 bytes