Better path handling in debug mode