error handling, figuring out cwd issues for cross-platform