changing the return value of a function from Byte to Integer
preventing a potential NPE and returning if the file doesn't exist
simplifying a return statement