Fixed stat syscall error in main