Change to match check_output behaviour