Update LCM API

added error reporting to api