Multiple file input and GROK filters and single ES output

I am using a single Logstash config file for multiple file inputs and grok filters and single ES output. The problem is that, it goes in infinite loop and I don't know why. I created separate files to check on if GROK is working fine for respective logs and it works fine. Then I merged the content and did configtest as well.
Logical part:
#----------Start-----
input {
file {
#TypeA
#path for file A
}
file {
#TypeB
#path for file B
}
}

filter {
if [type="A"] {
#GROK for A
}
}

filter {
if [type="B"] {
#GROK for B
}
}

output {
elasticsearch {
#output config for elasticsearch
}
}
#----------End-----

Please guide me for same

Can you elaborate, what do you mean here?

I am running logstash manually i.e. (logstash -f /path/to/config/file -v). And after I execute the commad I can see all the logs getting parsed and it continues unless I stop it manually. Also there is no index created in ES for the logs being parsed.

I think you are experiencing the ignore_older feature.

By default the file input will ignore any files that are older than 24 hours.

Add ignore_older => 0 to disable this feature.