Added API function to create file.