Newly created file contents is never undefined.

file.contents is being used to signify if a file has been loaded or not.
An undefined value means "not loaded".  Probably worth more thought.

Probably.
Default syntax highlighting to RAML.