Ensured Data Will be Written to File

Now checks that a file location is selected before trying to write to a
location.