Put callback on an event from the file stream

Quick fix for the issue I posted.