Send output based on environment

If environment has process then do a process.stdout.write instead of console.log