read binary file into stack