add locker code
use logging module instead of print