Fix hidden file logic