replace fprintf with PRINT