fixing routine to read directive file