Add timeouts to queries; add console tracebacks outside debug mode