Logstash not outputing data to any output plugin

On further investigation i have found that logstash is working fine

test.conf

input {
	stdin {}
}

output {
	file {
		path => "/root/file.txt"
	}

	stdout {
	}
}

/usr/share/logstash/bin/logstash -f test.conf

/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/awesome_print-1.7.0/lib/awesome_print/formatters/base_formatter.rb:31: warning: constant ::Fixnum is deprecated
{
       "message" => "hi",
      "@version" => "1",
          "host" => "ubuntu-s-2vcpu-4gb-blr1-01",
    "@timestamp" => 2020-04-24T12:49:15.347Z
}
hello
{
       "message" => "hello",
      "@version" => "1",
          "host" => "ubuntu-s-2vcpu-4gb-blr1-01",
    "@timestamp" => 2020-04-24T12:49:19.656Z
}

cat /root/file.txt

{"message":"hi","@version":"1","host":"ubuntu-s-2vcpu-4gb-blr1-01","@timestamp":"2020-04-24T12:49:15.347Z"}
{"message":"hello","@version":"1","host":"ubuntu-s-2vcpu-4gb-blr1-01","@timestamp":"2020-04-24T12:49:19.656Z"}