Second approach: log function is overwritten. Branch discontinued