create file if required