It would be very advantageous to have a safety mechanism in this script that waits for the printed part to drop into a collection bin detected by a mechanical switch or beam break switch. Having the code to wait for a low or high GPIO condition would allow someone to add this safety mechanism.