Working version with turnoff console output