Various bugfixes

Files can't be moved

Configfile can't be written