Can't return the error without using popen3