add defaults for env variables and check argc