put dotclang file exist test code in Init block

many fixes from @jreybert