added limit on log message length