Avoid permission errors when trying to open files