fix bug for building file