This should be more efficent, or at least handle errors better
Print the error stack trace, or toString if not an Error object