Adding truncate support

Change-Id: I5ae1b1946eb6da23323ce3d9172bc469ac5dd48d