added truncate support to work around write issues on certian fs'