fix compact and repair function to show output, include run parameter