lock handling moved from BackgroundJob into Helper