ignore debug directory
add gtest library
fix close() bug