added exception handling for the 'show' command