switched up redirection to file