Fix remote file validation

Fixes Issue #2