Catch source execution error and return it as str

Handle source execution errors