Adding checks for file size up front.