Save Render and Shadow Layer Separately
The file output node has two properties that determine the file that the image is written to, the base path (in red) which is the folder to save in and the subpath (in green) which could be a filename or a folder/filename combination.



In your example file you have two file output nodes that use the same base path and subpath, the second file gets saved over the top of the first one.

You also don't need two file output nodes, you can add multiple inputs to one node that have their own subpath and optionally image type settings. This can help as it prevents two inputs using the same subpath.