minor os-related fixes
towards integration with main.py
integration complete