add logging functional