Open and Print functions working - quit causes core dump