Set return code.
Return non 0 error code if it fails.