Put callback on an event from the file stream