question: private void deleteFileIfEmpty ( ) throws IOException { if ( Files . size ( preferencesFilePath ) == 0 ) { Files . delete ( preferencesFilePath ) ; } }
target:  It may happen that the file is empty when the process is forcibly killed, so remove the file if that happened.