replaced some file utils