Added file integrity check