sudo fix and check for existing file