fixed config loading and database location