The issue you are facing has been somewhat common lately.
I watched a video where Prof. Malan talks about how the cloud framework was implemented. He explained that, as resources are limited, some slowdown can appear when many students work together on highly intensive tasks.
Now, Pset5 and Pset6 are the most intensive problem sets, the first is I/O bound, the second is CPU bound.
As the schools close during summer, there have been many more students asking for resources, and the back-end servers slowed down a little. This means that more time was required to complete each single task.
Unfortunately, each task that runs on the server is scheduled a maximum slice of time to be executed for efficience purposes. When the time slice is completed, the application is shut down, and the checking routine faces an unexpected ed of input. For this reason, we may have correct programs that don't always pass the check50 routine.
My hint is: start the next Pset while trying check50 on Pset5, possibly on non-peak hours: your program will pass it with flying colours.