added missing print functions
fixed type warning
Disable MAAP code until complete
Handle error value from ftell properly