Added stack trace to errors

Errors now show stack trace for functions called and lines where they
are called from