Added cast to string of Exception, and egg directory envvar
string fix
Added try/catch around imports and fixed issue with return output where there was only one line of output