fixed logpath null issue