Added current version of smartReadFile.php from 20/11/2011