Fixed issue with reading logs and crash due to NullPointerException