Code changes to support larger input read()s. Now max size is 1M (for larger support simply change #define).