file operations implemented with nio shorthands