Replaced 'thrift -version' with 'which thrift' since the former returns status 1.