add support for password in files, some buxfixes