Added some error checking, changed command format