Fixed missing import and improved script return information.