functions in fileop were reordered