adding in file redirection capability