make log more resilent