Add security to -d/-r options