fix file redirecting error