writing to a file media.txt