[BUGFIX] Close source stream after publishing a file