fixed openDB error, creating appFilesDirectory if doesn't exist