make a mainfail
added logging/printing method to cleanup