Properly check whether triangle is installed
Write command output to log file