Fixed references to qwifi functions
updated error function to no call sys.exit. Added raises to main.