fix bug which causes log message to crash the whole process if one of the parameters is missing/empty