error handling

in parsecommand