moved code to another script for restore

Moved the checking for back to jamf to get better logging in JAMF.