You can change the property to close the file after writing the write-ahead logs. You can do this from the Spark-shell. Refer to the below command:
val sc = new SparkContext(new SparkConf())
./bin/spark-submit <all your existing options> --spark.streaming.driver.writeAheadLog.closeFileAfterWrite=true