stdout, stderr permissions fix