fixing subprocess logging