4 down vote
I had a similar issue - for clarity, you need the following lines at the top of your sketch:
import java.io.BufferedWriter; import java.io.FileWriter;