avoid passing images via pipes, because of intermittent deadlocks
pointless splitting script into two separate processes without pipes