Adding some check to avoid errors

According to the FreeBSD man page, the -r argument is accepted but just ignored. So I don't think it will hurt that much.