removed empty file; additional events handling for streams