public void messagesQueue() throws IOException{
        try{
            if(!sender.messageQueue.isEmpty()){
            FileOutputStream f_out = new FileOutputStream("qtemp.ser");
            ObjectOutputStream out = new ObjectOutputStream(f_out);
            out.writeObject(sender.messageQueue);
            out.close();
            f_out.close();
            }
        }
        catch(IOException e){
        e.printStackTrace();
        }
    }