added support for write community into file