Made tag reading safer and easier.
Show error message if we couldn't write tags to a file.