added code to allow usage with node and nodejs executables