Make file check strict to avoid memory leaks. Add cabal file