added shutdown method in loader.s