using temp dir for storing credentials