Don't you have to release the lock after the puts statement in the following line?