better logging and fixed cwd cross package handling