Added stacktrace output to openOrCreateDatabase