Updated code for LogStash Book release 1.2