private void openButtonAction() {
        clearOldData();

        // Show VideoFileDialog and wait for selected file
        if (videoFileDialog.showOpenDialog(mainWindow) == JFileChooser.APPROVE_OPTION)
        {
            // Get result of dialog window choosing
            if ((currentFile = videoFileDialog.getSelectedFile()).exists())
            {
                text.append(String.format("Selected file: %s.%s", currentFile.getAbsolutePath(), newline));

                // Put the path to file into text field
                pathText.setText(currentFile.getAbsolutePath());
                this.setStatePrepared();
            }
            else
            {
                text.append(String.format("File %s doesn't exist.%s", currentFile.getAbsolutePath(), newline));

                // File doesn't exist so set file to null
                this.setStateInitial();
            }
        }
        else
        {
            // File chooser was canceled
            text.append(String.format("Open command cancelled by user.%s", newline));
            this.setStateInitial();
        }
    }