Change to use /usr/bin/env for better cross platform compatibility