check cache permissions before including other files