log both error and error.stack