Add example for clustering and better error handling for missing inputs in local mode. Fixes #15.