changed order of robot state check when stepping
better reading of stream
repair message validation