Moved lib out of .gitignore
Added a check for a rare condition