replaced model.bug with tempfile