using correct subprocess open invocation