Cleanup messageFormatter example to use logs from build steps instead of directly using build logs

Current example ignores build steps and directly fetches build logs, this change fetches the last completed step first and then goes about extracting build logs from said step. Makes for a better example to follow
I'm only checking if the step finished. If no step has finished, then step will point to the first step that was executed because that is where the loop ends, so you would get the logs for that. 

I can change that to last step that was run, if that is expected behaviour