Added some error/warning messages to sg handler