Added logging to genGraph