Corrected docblocks and removed unnecessary use statement
Added sanitizing of lockfile name