Added support for rectangle shapes in io library