Close FileOutputStream after storing properties