even better SSL check and define directory