Added better error handling. Fixed a bug in a argument for web args.