Added the proper close methods for the logger writter for the end of the program (in Main.java)