bug fix to lib file exists check