move x509 enviroment to config file, fix attempted rm of nonexistent file