fix paths, remove bad error checking at the end