check if ca file exists before assigning it