Helper function to read data from the provided path
data from file
Throws error when path does not exists or is empty
path
Helper function to read data from the provided path