Corrupt file detection