doesn't break if no overwriting directory
fixed a bug that hostname settings wasn't applied