make problem with error logging robust