Added file extension to write events