work arround issues with redirection output to a file, fixing issue #4