Changes to base template
Add support for stdin direction