checkValid() now verifies that the file is the correct size
commented out code to actually restore a file, for testing