Added tempfile module dependency