Adding print stack trace to try and find where error is occuring