io/resource and io/file not required

Calling io/resource and io/file results in nil which throws an Exception. A simpler way of doing is to remove both of them as they are not really required.