getting file as resource