added try..except around file open call as this will fail on some systems.
In such cases it is assumed usergroups are not enabled.