corrected file by adding require fs line.