changed format of fileprint to add leading spaces