added ALL the file manip funcs
migration to EJS