reduce logging and fix potential NPE

When calling REST service with non-exist doc id, you won't get NullPointerException.