finish file and directory operations