added sychronized access for checking gencode records