Added an error message and an error checker to make sure cursors do not contain malformed characters