Trigger event on File.write