create file from templates