session locking bug fixes, quiet option added to API CLI