Fixed compilation issue and missing "require('fs')" option