fix problem with different keyCodes
check for write permission
fix rootnamespace bug