Made the required changes 

As i suggested yesterday, throw a custom exception ie `ResourceNotFoundException` if file path is invalid.