in reply to cleaning out a file

What about plain ol' ...
    truncate 'filename', 0;