Print stack trace when unexpected error occurs