fix file create func