No, there is no totally safe ways to store passwords in a file, that includes in Keypass files. These are pretty secure, but that doesn't translate to really safe. The problem with password management systems is, they are protected by a single master password. If a black-hat obtains the file, he only needs to crack THAT password, and he has access to all of the passwords. This does takes time, but it has proven to take far less time than you'd think. Keypass is probably the best of these, probably good enough for most people - but read the last paragraph.
A more robust system uses a password salt for each password, but no encryption method known to man is unbreakable. In this case you'd need to crack the master password, and the unique key for any of the passwords it contains. It just makes it harder, not impossible.
Ok so you do all this, and your password file is as secure as man can make it. But then what are your passwords used on? Your bank. Your e-mail. This website, RSI's website. Every other website you have passwords on. So even then, you are still depending on the place the password is for to be secure. That is proving to be "hit and miss" at best. You would be amazed how many "secure" websites, aren't. That's who you're trusting. Don't trust them.