Fixed file-resource issues (fixes #6)