fix putfile to channel