add ls with filtered queries for principals
quit on error as well as success