optionalArgument() added.
getExtension() added.
Updates on error messages.