writing to pose file and underlay image