Adjusted logger destroy to free up file resource.