Added url param and handled exceptions