fix adding file greater than 16KB bug