Add function for reading files