Added more path commands and some error checking
More error checking