Updated messaging flow to pass in a message from the highest levels of
the api.

Updated the key file reading utility method.