Added logs. Changed file system usage in getNFromFile()