Added shutdown function to logger