fix Files function