Bugfixes and expanden filenames