correct return code addition in statuscheck
breaking security checks out into checkscript