read from stdin by default
check file existance