local & server: log stack trace to file when panic