File operations with lambdas