Even if you use encryption, the fact that you have to have some kind of fixed key still makes the password trivial to retrieve. To make sure that the administrators of the systems your application is running on can easily keep tabs on its use and abuse, you should maintain a log file that records the most important actions taken by your code. If you're about to perform a dangerous action in your program, make sure you log the details of the action before actually doing it. This ensures a record is available in case your application blows up during while processing the action. To prevent log files from becoming DoS tools in themselves, make sure to provide sufficient tools to manage their size.
Nothing kills performance like a full disk volume.
Although this should be user configurable, it's OK to keep log files around for a few days. Whatever you do, don't start trimming current log files when you detect low disk space conditions. Trimming may delete valuable information on an in-progress exploit. Avoiding Exploits by Design Avoiding DoS attacks and other exploits that use your software as a vector is not that difficult. Although stamping out every last exploit possibility is probably more trouble than it's worth, that's a far cry from the sad state most software is in today.