u/danielw/dm-1395

Creating PR for reviewing DM-1395
Unused imports `os` and `errno`