Changed max int to long for bigger file support