Add checking max payload size