Checks if on backupdb before writing detection files and sets path accordingly