changed all error logs to e.message