**Definitely** need to check return codes from these functions.