parameterized class and fixed issue still with lock file on Ubuntu