Add stdin, stdout, overwrite checking