Add implementation for file read function