Made ReadFileToArray safer (kinda)