My only nit is that all of these should be `.substring( 0, 512 )` to keep consistent with the code style that is already there.