skip nonexistent files when restoring
fix compiler warnings