SQUASHME: proper error handling for fread
SQUASHME: order syscalls
SQUASHME: init syscalls in dedicated function