create file & directories if they don't exist