is there an easy way to create a file and its subdirectory if they dont exists ?