Bugfix: create always opened the file read-only. Improved logging.