add log functions and change log message