improofed error handling of softwarechannel_mirrorpackages

improofed error handling and code cleanup