Added error handling and ready status to the plugin