Filebeat is not taking input in regular interval

A node js application is writing on a JSON file in a interval of 30s from where Filebeat is supposed to take input and send to elasticsearch through logstash.But filebeat is not reading the input until I open the file in text editor then reload and save it.
I have confirmed that Node JS is writing and saving the data in JSON file.But Filebeat is not reading that data in a interval.