add create file function.

Signed-off-by: August Yip <augustyip@gmail.com>