public void changePost(int id, String newPost) {
        boolean exists = false;
        Post post = null;
        if (newPost.equalsIgnoreCase("manager")) {
            post = new Manager(new ArrayList<Integer>());
        } else if (newPost.equalsIgnoreCase("worker")) {
            post = new Worker();
        } else if (newPost.equalsIgnoreCase("other")) {
          post = new Other("NONE");
        }
        for (Employee employee : staff) {
            if (employee.getId() == id) {
                exists = true;
                employee.setPost(post);
                prepareToWrite();
                logger.info("Post for employee id: " + id + " was changed to: " + newPost);
            }
            if (!exists) {
                logger.error("Can't find employee with id: " + id);
                System.exit(0);
            }
        }
    }