Adding GA code
Fix a bug that doesn't recognize file/directory type