loadRootMirrorsAndKeys :: ServerEnv
                       -> IO (Maybe (Root, Mirrors, Some Sec.Key, Some Sec.Key))
loadRootMirrorsAndKeys env = do
    anyExist <- (\s t r m -> s || t || r || m)
            <$> Sec.doesFileExist (onDiskSnapshotKey  env)
            <*> Sec.doesFileExist (onDiskTimestampKey env)
            <*> Sec.doesFileExist (onDiskRoot    env)
            <*> Sec.doesFileExist (onDiskMirrors env)
    if not anyExist
      then return Nothing
      else do
        snapshotKey  <- readKey (onDiskSnapshotKey  env)
        timestampKey <- readKey (onDiskTimestampKey env)
        root         <- Root    <$> getTUFFile (onDiskRoot    env)
        mirrors      <- Mirrors <$> getTUFFile (onDiskMirrors env)
        --TODO: check sanity before updating
        return (Just (root, mirrors, snapshotKey, timestampKey))
loadRootMirrorsAndKeys :: ServerEnv
                       -> IO (Maybe (Root, Mirrors, Some Sec.Key, Some Sec.Key))
loadRootMirrorsAndKeys env = do
    anyExist <- (\s t r m -> s || t || r || m)
            <$> Sec.doesFileExist (onDiskSnapshotKey  env)
            <*> Sec.doesFileExist (onDiskTimestampKey env)
            <*> Sec.doesFileExist (onDiskRoot    env)
            <*> Sec.doesFileExist (onDiskMirrors env)
    if not anyExist
      then return Nothing
      else do
        snapshotKey  <- readKey (onDiskSnapshotKey  env)
        timestampKey <- readKey (onDiskTimestampKey env)
        root         <- Root    <$> getTUFFile (onDiskRoot    env)
        mirrors      <- Mirrors <$> getTUFFile (onDiskMirrors env)
        --TODO: check sanity before updating
        return (Just (root, mirrors, snapshotKey, timestampKey))
loadRootMirrorsAndKeys env = do
    anyExist <- (\s t r m -> s || t || r || m)
            <$> Sec.doesFileExist (onDiskSnapshotKey  env)
            <*> Sec.doesFileExist (onDiskTimestampKey env)
            <*> Sec.doesFileExist (onDiskRoot    env)
            <*> Sec.doesFileExist (onDiskMirrors env)
    if not anyExist
      then return Nothing
      else do
        snapshotKey  <- readKey (onDiskSnapshotKey  env)
        timestampKey <- readKey (onDiskTimestampKey env)
        root         <- Root    <$> getTUFFile (onDiskRoot    env)
        mirrors      <- Mirrors <$> getTUFFile (onDiskMirrors env)
        --TODO: check sanity before updating
        return (Just (root, mirrors, snapshotKey, timestampKey))