Fixed nullptr exception
Fixed empty array bug
Fixed unused variable bug
Removed save(..., filetype)