add logging for ruby block