Use configuration directory not currentdir to store app key.