Added diagnostic information to PrepareStaticPath and TryGetPath in case of failure.