{
getPrefs().openLocation = file; // Remember the open directory
try
{
InputStream in = new FileInputStream(file);
JreepadReader reader = new AutoDetectReader(getPrefs().getEncoding(), getPrefs().autoDetectHtmlArticles);
document = reader.read(in);
document.setSaveLocation(file);
}
catch(IOException e)
{
JOptionPane.showMessageDialog(this, e, lang.getString("MSG_LOAD_FILE_FAILED") , JOptionPane.ERROR_MESSAGE);