Added vars to check if we must write info on log table.