File I/O alledgedly working, error analysis breaks for z>0 edge of Kapton