added mocktest for write/open to build_pna