Fixes paths, added trailing slashes
Debug output added to check HTTP results