FIXME: tempfile needs help after rebase