refreshFile function fix