added create file function