Added permissions and printing out the name of the created file.