fixes for:
1. NPE from server
2. display error on log failure
other small fixes