better check using "isEmpty"
reduce log output