Fixed generating of the permission file in case there is none yet.