Fix relative paths

also, a few improvements to debug/error messages