truncate key length if greater than 250