updated output for checking a singla package name
fixed outputfile logic for package list logic