public static void main(String[] args) {
        writer = new WriteIntoSystemOut();
        try {
            if (writer.getters.worker.manager.ConnectToCard()) {
                System.out.println("Successfully connected to card");
                writer.writeDataWithoutAuthentication();
                System.out.flush();

                System.out.println("\nEnter your PIN: ");
                if (writer.getters.worker.manager.VerifyPin(getCorrectPinFromUser())) {
                    Converter.fillEFSizes();
                    writer.writeDataWithAuthentication();
                }
            }
        } catch (NoReaderFoundException ex) {
            System.err.println("No terminal found");
        } catch (CardNotPresentException ex) {
            System.err.println("No card found");
        } catch (WrongPINException ex) {
            System.err.println("Wrong PIN entered");
        } catch (WrongLengthOfPINException ex) {
            System.err.println("Wrong PIN length entered: PIN must have 4-8 characters");
        } catch (WrongPINCharactersException ex) {
            System.err.println("PIN must consist only of numerical characters");
        } catch (Exception ex) {
            System.err.println("Exception : " + ex);
        } finally {
            try {
                writer.getters.worker.manager.DisconnectFromCard();
            } catch (Exception ex) {
                Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }