Fixed reading the wrong key from database when getting output log.

Added .idea to gitignore to support PHPStorm