changed some file manipulation utils