-x options need to be after -r
exit, not return