Flush the tempfile (incase there is buffering) and have a codepath for when jobs actually do not exist