catching print execution errors
after print completes, retract the head
ignoring binary files