Thanks to Travis. Found a bug.
Should use waitFor, to get process exit code