Why do you say "for terminal"? What about redirection file path invalid? And you are missing a space before and a newline after the filename.