fixes to file manipulation commands