Modifications made for handling wget return code.