change io:fread to getline, fix seconds to date