using the `str*` functions check `errno` for EINVAL and ERANGE errors and print to stderr that an invalid argument was passed and what is expected.