Fix 2.6 incompatibility
Add proper exit codes and perfdata