createFile(file) now creates all directories above it if needed.
Improved connection testing.