Using basename() to get right file name while streaming