If you pass PSK as hash for the network and not as plain text with the input parameters it would not work. The command SET_NETWORK will always return FAIL. It is better to remove them and leave the developer to choose if the current parameter needs to be provided with or without quotes depending on the parameter name and its behavior.