Added global file tests and minor fixes