fix first onFileReady call