Added debugging 'printf' in gem_run