Check and repair files