added exception handling for 'sg', 'rp', and 'sv' commands