Refactor some names and add check for existence of files in cert store