Fixed gateway to support all file extensions

Resolves #26