fixed O_TRUNC problem. added jls