avoid compiler warning because of unused variable
removed unused static field
added additional exit in inspection mode