add log msgs to prevent possible bugs