path and stdout/err fixes